<template>
  <div class="side_box">
    <div :class="isSelect?'custom_radio_selected':'custom_radio'" @click="selectRadio">
      <i></i>
    </div>
  </div>
</template>
<script>
export default {
  data () {
    return {
    }
  },
  props: {
    isSelect: Boolean
  },
  methods: {
    selectRadio () {
      if (!this.isSelect) {
        this.$emit('selectRadio')
        this.$emit('update:isSelect', true)
      }
    }
  }
}
</script>
<style lang="scss" scoped>
.side_box {
  height: 100%;
  display: flex;
  // align-items: center;
  justify-content: center;
  .custom_radio {
    margin-top: 19px;
    border: 1px solid #dcdfe6;
    border-radius: 100%;
    width: 14px;
    height: 14px;
    background-color: #fff;
    position: relative;
    cursor: pointer;
    display: inline-block;
    box-sizing: border-box;
    // background: #17b3a3;
    i {
      // width: 4px;
      // height: 4px;
      // border-radius: 100%;
      // background-color: #fff;
      // content: "";
      // position: absolute;
      // left: 50%;
      // top: 50%;
      // transform: translate(-50%, -50%);
    }
  }
  .custom_radio_selected {
    margin-top: 19px;
    border: 1px solid #dcdfe6;
    border-radius: 100%;
    width: 14px;
    height: 14px;
    background-color: #fff;
    position: relative;
    cursor: pointer;
    display: inline-block;
    box-sizing: border-box;
    background: #17b3a3;
    i {
      width: 4px;
      height: 4px;
      border-radius: 100%;
      background-color: #fff;
      content: "";
      position: absolute;
      left: 50%;
      top: 50%;
      transform: translate(-50%, -50%);
    }
  }
}
</style>
